[BUG][Dataloader] preserve column casing in DataFusion SQL dialect to fix camelCase column lookups#536
Merged
ShreyeshArangath merged 4 commits intolinkedin:mainfrom Apr 8, 2026
Conversation
…e column lookups The DataFusion dialect's NORMALIZATION_STRATEGY was set to LOWERCASE, causing sqlglot to lowercase all identifiers during SQL optimization. This broke tables with camelCase columns (e.g. viewerId, feedPosition) because both DataFusion execution and PyIceberg scans are case-sensitive. Change the strategy to CASE_SENSITIVE, which matches DataFusion's actual behavior and preserves original identifier casing throughout the pipeline. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… tests Makes the test data truly ambiguous — all three columns lowercase to "userid", so a lowercasing dialect would collapse them into one column. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…-case tests Renames generic userId/USERID/UserID to purchaseAmount/PURCHASEAMOUNT/ PurchaseAmount for better readability while preserving the case-collision property that makes the tests meaningful. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replaces colliding casing variants (purchaseAmount/PURCHASEAMOUNT/ PurchaseAmount) with distinct descriptive columns (purchaseAmount, itemCount, discountRate) that better represent a real schema. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
robreeves
approved these changes
Apr 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The DataFusion dialect's NORMALIZATION_STRATEGY was set to LOWERCASE, causing sqlglot to lowercase all identifiers during SQL optimization. This broke tables with camelCase columns (e.g. viewerId, feedPosition) because both DataFusion execution and PyIceberg scans are case-sensitive.
Change the strategy to CASE_SENSITIVE, which matches DataFusion's actual behavior and preserves original identifier casing throughout the pipeline.
Changes
For all the boxes checked, please include additional details of the changes made in this pull request.
Testing Done
For all the boxes checked, include a detailed description of the testing done for the changes made in this pull request.
Additional Information
For all the boxes checked, include additional details of the changes made in this pull request.